#ifndef PROPERTYBOX_H
#define PROPERTYBOX_H

#include <BMenu>
#include <BMenuBar>
#include <BLineEdit>
#include <BTableWidget>
#include <BHtmlWidget>
#include <BComboBox>
#include <BTextEdit>
#include <BButton>
#include <BDialog>

using namespace BWE;

class PropertyBox : public BDialog
{
public:
	PropertyBox(BWidget* parent = 0);
	~PropertyBox();

	void attachHtmlWidget(BHtmlWidget* htmlWidget);

protected:
	void slotNameEditFinished(BObject* object, const BValue& value);
	void slotHtmlItemSelected(BObject* object, const BValue& value);
	void slotHtmlItemTextChanged(BObject* object, const BValue& value);
	void slotComboCurrentChanged(BObject* object, const BValue& value);
	void slotFormatEditFinished(BObject* object, const BValue& value);
	void slotAttribItemDoubleClicked(BObject* object, const BValue& value);
	void slotAttribEditFinished(BObject* object, const BValue& value);
	void slotAttribEditFocused(BObject* object, const BValue& value);

protected:
	virtual void styleEvent(const BEvent& event);

private:
	BComboBox*			_encodeComboBox;
	BLineEdit*			_titleLineEdit;
	BLineEdit*			_styleSheetEdit;
	BComboBox*			_nameComboBox;
	BLineEdit*			_formatEdit;
	BTableWidget*		_attribTable;
	BTextEdit*			_textEdit;
	BLineEdit*			_attribEdit;

	BHolder<BHtmlWidget>		_htmlWidget;
	BHolder<BHtmlItem>			_htmlItem;
};

#endif